Repository navigation
fix(id): do not persist actions for WaitingFull-refused group events (#2916) - #4255
Merged
Merged
Conversation
…2916) In settle, the Wait and Park arms wrote the group action before holding the event. When the hold refused with WaitingFull and the same ingest call committed for an unrelated reason (an expiry), the refused event's action row persisted forever. Hold first now, and write the action only when the hold actually holds the event. Regression tests mirror the triage probe: a WaitingFull refusal with a same-call expiry and a no-expiry control both leave the actions table empty after reopening, and a successfully held group event keeps its action across a reopen.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 26 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the triaged fix for #2916 (queue task 5470).
Change
pkgs/id/src/event_store/ingest.rs— insettle, theDecision::WaitandDecision::Parkarms held the event before writing its group action, and now write the action only when the hold actually holds the event (Hold::Held). Previouslystore_actionran beforem.hold(...), so aWaitingFullrefusal committed the refused event's action row whenever the same ingest call committed for an unrelated reason (e.g. expiring another author's held event) — and nothing ever deletesactionsrows.The
Acceptarm is unchanged (a stored event keeps its action), andattach_actionremains limited to stored events.Tests
New store-level regressions beside the existing waiting tests in
ingest.rs:test_a_waiting_full_refusal_persists_no_action_even_when_the_call_expires— mirrors the triage probe: B seq-1 held at t=0 (due t=1000), A seq-2 held at t=500 (A at cap 1), A seq-3 group event refusedWaitingFull, run at t=500 (no-expiry control) and t=1000 (same-call expiry). After reopening, the actions table is empty in both runs and the refused event is not waiting.test_a_held_group_event_keeps_its_action— a successfully held group event's action survives a reopen.Local verification:
rustfmt --edition 2024 --checkclean. Cargo tests were not run on the laptop (load ~90; CI-first policy) — CI on this PR is the test run.Refs #2916 · task 5470
Need help on this PR? Tag
@codesmith-botwith what you need.